export const formConf = {
  formRef: 'elForm',
  formModel: 'formData',
  size: 'medium',
  labelPosition: 'right',
  labelWidth: 100,
  formRules: 'rules',
  gutter: 15,
  disabled: false,
  span: 24,
  formBtns: true
}

export const inputComponents = [
  {
    label: '单行文本',
    tag: 'el-input',
    tagIcon: 'input',
    defaultValue: undefined,
    span: 6,
    clearable: true,
    prepend: '',
    readonly: false,
    append: ''
  },
  {
    label: '多行文本',
    tag: 'el-input',
    tagIcon: 'textarea',
    type: 'textarea',
    defaultValue: undefined,
    readonly: false,
    span: 24,
  },
  {
    label: '图片上传',
    tag: 'image-upload',
    tagIcon: 'upload',
    defaultValue: null,
    readonly: false,
    span: 6
  },
  {
    label: '视频上传',
    tag: 'video-upload',
    tagIcon: 'upload',
    defaultValue: null,
    readonly: false,
    span: 6
  },
  {
    label: '表格',
    tag: 'easy-table',
    tagIcon: 'table',
    readonly: false,
    defaultValue: null,
    span: 6
  }
]

export const selectComponents = [
  
]

export const layoutComponents = [
  {
    layout: 'rowFormItem',
    tagIcon: 'row',
    type: 'default',
    justify: 'start',
    align: 'top',
    label: '行容器',
    layoutTree: true,
    children: [],
    document: 'https://element.eleme.cn/#/zh-CN/component/layout'
  },
  {
    layout: 'colFormItem',
    label: '按钮',
    changeTag: true,
    labelWidth: null,
    tag: 'el-button',
    tagIcon: 'button',
    span: 24,
    default: '主要按钮',
    type: 'primary',
    icon: 'el-icon-search',
    size: 'medium',
    disabled: false,
    document: 'https://element.eleme.cn/#/zh-CN/component/button'
  }
]

// 组件rule的触发方式，无触发方式的组件不生成rule
export const trigger = {
  'el-input': 'blur',
  'el-input-number': 'blur',
  'el-select': 'change',
  'el-radio-group': 'change',
  'el-checkbox-group': 'change',
  'el-cascader': 'change',
  'el-time-picker': 'change',
  'el-date-picker': 'change',
  'el-rate': 'change'
}
